package com.tarena.charging.user.controller;

import cn.tedu.charging.common.pojo.JsonResult;
import cn.tedu.charging.common.pojo.vo.UserInfoVO;
import com.tarena.charging.user.service.UserVehicleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "用户车辆模块")
public class UserVehicleController {
    @Autowired
    private UserVehicleService userVehicleService;
    @GetMapping("/user/info/{userId}")
    @ApiOperation("查询用户车辆信息")
    public JsonResult<UserInfoVO> getUserCarInfo(@PathVariable("userId") Integer userId){
        UserInfoVO vo=userVehicleService.getUserCarInfo(userId);
        return JsonResult.ok(vo);
    }
}
